package com.web.portal.services.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.web.portal.mapper.RelationMapper;
import com.web.portal.pojo.Project;
import com.web.portal.pojo.Relation;
import com.web.portal.services.RelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RelationServiceImpl extends ServiceImpl<RelationMapper, Relation>
        implements RelationService {
    @Autowired
    private RelationMapper relationMapper;

    @Override
    public Relation selectByRelationCode(String relationCode) {
        QueryWrapper<Relation> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("relation_code", relationCode);
        return relationMapper.selectOne(queryWrapper);
    }
}
